package com.naiterui.ehp.bs.b2c.address.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <pre>
 *
 * </pre>
 *
 * @author zhouyanxin
 * @date 2019/1/11 下午11:19
 * @since 1.0.0
 */
@Data
@Entity
@NoArgsConstructor
@Table(name = "p_shipping_info")
public class ShippingInfo implements java.io.Serializable {
    private static final long serialVersionUID = -42712743228429752L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Column(name = "receiver", nullable = false, length = 20)
    private String receiver;

    @Column(name = "province", nullable = false, length = 10)
    private String province;

    @Column(name = "city", nullable = false, length = 10)
    private String city;

    @Column(name = "county", nullable = false, length = 10)
    private String county;

    @Column(name = "addr", nullable = false, length = 100)
    private String addr;

    @Column(name = "city_id", nullable = false)
    private Long cityId;

    @Column(name = "zipcode", nullable = true, length = 10)
    private String zipcode;

    @Column(name = "phone", nullable = false, length = 20)
    private String phone;

    @Column(name = "default_addr", nullable = false, length = 1)
    private Integer defaultAddr;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

}
